From: Giovanni Campagna Date: Fri, 31 Aug 2012 15:51:32 +0000 (+0200) Subject: ScreenShield: hide the cursor while the lock screen is on X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5474 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e5f7390c096d58ab8de7b7d6acb4d316f91cfb76;p=gnome-shell.git ScreenShield: hide the cursor while the lock screen is on While the screen is locked and the cursor is not moved, the mouse cursor should be hidden, to indicate the machine is idle. https://bugzilla.gnome.org/show_bug.cgi?id=682535 --- diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index 86dcf7dac..e47f0aa7c 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -704,6 +704,8 @@ const ScreenShield = new Lang.Class({ this._lockScreenGroup.hide(); } + global.stage.show_cursor(); + if (Main.sessionMode.currentMode == 'lock-screen') Main.sessionMode.popMode('lock-screen'); }, @@ -792,6 +794,16 @@ const ScreenShield = new Lang.Class({ this._arrowAnimationId = Mainloop.timeout_add(6000, Lang.bind(this, this._animateArrows)); this._animateArrows(); + let motionId = global.stage.connect('captured-event', function(stage, event) { + if (event.type() == Clutter.EventType.MOTION) { + global.stage.show_cursor(); + global.stage.disconnect(motionId); + } + + return false; + }); + global.stage.hide_cursor(); + this._lockScreenState = MessageTray.State.SHOWN; this._lockScreenGroup.fixed_position_set = false; this._lockScreenScrollCounter = 0;